<? $data = array(
    '1' => 'Accepted',
    '2' => 'Wrong answer',
    '3' => 'Time limit exceeded',
    '4' => 'Presentation Error',
    '5' => 'Compilation error',
    '6' => 'Memory limit exceeded',
    '7' => 'Runtime error',
    '8' => 'Compiling',
    '9' => 'Running',
    '10' => 'Waiting'
);?>

ИСХОДНИК РЕШЕНИЯ №<?= $this->source[0]['source_id']; ?> ЗАДАЧИ №<?= $this->source[0]['problem_id']; ?>
<div style="float: left;">
    <pre>
        <?= htmlspecialchars($this->source[0]['body']); ?>
    </pre>
</div>
<div style="float: right;">
    <table border="1" cellpadding=2 cellspacing=1>
    <tr>
        <th width=30>Тест</th>
        <th>Результат</th>
        <th>Время</th>
        <th>Память</th>
    </tr>
    <? foreach ($this->testResult as $value) : ?>
    <tr align=center>
        <td align=right>
            <?= $value['test_num'] ?>
        </td>

        <td style="color:
                                <? if ($value['result_id'] == 1) :?> 
                                    #008000 
                                <? elseif ($value['result_id'] >= 2 && $value['result_id'] <= 7 ) :?> 
                                    #E3170D 
                                <? endif; ?>">
            <?= $data[intval($value['result_id'])]; ?>
        </td>

        <td>
            <?= $value['time_limit']; ?>
        </td>

        <td>
            <?= $value['memory_limit']; ?> Кб            
        </td>
    </tr>
    <? endforeach;?>
    </table>
</div>
